﻿<Page
    x:Class="SimpleLayoutDemo.Views.WrapGridPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:SimpleLayoutDemo.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <ItemsControl Margin="50">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapGrid MaximumRowsOrColumns="2"/>
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            
            <ItemsControl.Items>
                <Rectangle Fill="Blue"
                       Width="220"
                       Height="220" />
                <Ellipse Fill="Red"
                     Width="175"
                     Height="175" />
                <Polygon Fill="Green"
                     Points="0,0 275,0 275,200"/>
            </ItemsControl.Items>
        </ItemsControl>
    </Grid>
</Page>